package com.feng.eduservice.service;

import com.feng.commonutils.R;
import com.feng.eduservice.entity.EduChapter;
import com.baomidou.mybatisplus.extension.service.IService;
import com.feng.eduservice.vo.course.chapterVo;

import java.util.List;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author fengge
 * @since 2023-01-17
 */
public interface EduChapterService extends IService<EduChapter> {

    /**
     * 根据课程id树形查询章节与对应章节的小节
     * @param courseId
     * @return
     */
    List<chapterVo> getChapterVideo(String courseId);

    /**
     * 添加章节
     * @param eduChapter
     * @return
     */
    R addChapter(EduChapter eduChapter);

    /**
     * 删除章节，如果有小节不能删除
     * @param chapterId
     * @return
     */
    R deleteChapter(String chapterId);
}
